home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00108_Script_newTourButton < prev    next >
Text File  |  1999-04-25  |  4KB  |  196 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13. -------*This script is not used in this version of the movie*----------
  14.  
  15. property mySprite, NeutralName, RolloverName, startAnimation, maxSlideSpeed, maxFlashSpeed,¼
  16.          AnimationIsOver,planeName,slideSpeed,flashSpeed,memberCount
  17.  
  18. on new me
  19.   set startAnimation = FALSE
  20.   set AnimationIsOver = FALSE
  21.   set maxSlideSpeed = 0
  22.   set maxFlashSpeed = 2
  23.   set mySprite = the spriteNum of me
  24.   
  25.   set NeutralName = getNeutralName(me, mySprite)
  26.   set RolloverName = NeutralName&"-rol"
  27.   set planeName = getPlaneName (me)
  28.  
  29. end
  30.  
  31. on getPlaneName me
  32.   set Name = NeutralName
  33.   repeat with i =  the Number of Chars in Name down to 1
  34.     if char i of Name <> "_" then 
  35.       delete char i of Name
  36.     else
  37.       delete char i of Name
  38.       exit repeat
  39.     end if
  40.   end repeat
  41.   
  42.   return Name
  43.   
  44. end
  45.  
  46.  
  47. on mouseEnter me
  48.   if not AnimationIsOver then
  49.     set the member of sprite mySprite = member  RolloverName
  50.     --  set the member of sprite linkedSprite = member  linkedHiliteName
  51.   end if
  52.   
  53. end
  54.  
  55. on mouseLeave me
  56.   if not AnimationIsOver then
  57.     set the member of sprite mySprite = member  NeutralName
  58.  
  59.   end if
  60.   
  61. end
  62.  
  63. on mouseUp me
  64.   set startAnimation = TRUE
  65.   set memberCount = 0
  66.   set slideSpeed = 0
  67.   set flashSpeed = 0
  68.  
  69. end
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. on getNeutralName me,SpriteNum
  77.   
  78.   set aMember = the member of sprite spriteNum
  79.   set Name = the name of member aMember
  80.   if Name contains "-" then
  81.     repeat with i = the Number of Chars of Name down to 1
  82.       if char i of Name <> "-" then 
  83.         delete char i of Name
  84.       else
  85.         delete char i of Name
  86.         exit repeat
  87.       end if
  88.     end repeat
  89.   end if
  90.   
  91.   
  92.   return Name
  93.   
  94. end
  95.  
  96.  
  97. on exitFrame me
  98.   if startAnimation then
  99.     doAnimation me 
  100.   end if
  101.   if AnimationIsOver then
  102.     set the member of sprite mySprite = 19&"-"&planeName
  103.     oldScript me
  104.     oldMouseUp me
  105.   end if
  106.   
  107. end
  108.  
  109.  
  110. on doAnimation me
  111.   
  112.   if memberCount<=14 then
  113.     slideButton me
  114.   else
  115.     flashPlane me
  116.   end if
  117.   
  118.   
  119.   
  120. end
  121.  
  122. on slideButton me
  123.   if slideSpeed >= maxSlideSpeed then
  124.     set the member of sprite mySprite = memberCount&"-"&planeName
  125.     set memberCount = memberCount+1
  126.     set slideSpeed = 0
  127.   end if
  128.   set slideSpeed = slideSpeed+1
  129. end
  130.  
  131.  
  132. on flashPlane me
  133.   if flashSpeed >= maxFlashSpeed then
  134.     set the member of sprite mySprite = memberCount&"-"&planeName
  135.     set memberCount = memberCount+1
  136.     set flashSpeed = 0
  137.     
  138.     if memberCount > 19 then 
  139.       set startAnimation = FALSE
  140.       set AnimationIsOver = TRUE
  141.       --      set memberCount = 0
  142.       
  143.     end if
  144.     
  145.   end if
  146.   set flashSpeed = flashSpeed+1
  147. end
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154. on oldScript me
  155.   global gFrame, menuController
  156.   set gFrame=the frame
  157.   sound stop(1)
  158.   sound stop(2)
  159.   --  updatestage
  160.   
  161.   
  162.   if the name of member the member of sprite mysprite contains "-rol" then
  163.     
  164.     puppetsound 3,"qtvrstrt"
  165.   else
  166.     puppetsound 3,"mousedn"
  167.     
  168.     if IsQTVRMovie(gQTVRObj) then 
  169.       getview
  170.       closemovie
  171.     else
  172.       puppetsprite 22 false
  173.     end if
  174.   end if 
  175.   
  176.   sendAllSprites(#CDSmallMenuPuppetsOff)
  177.   sendAllSprites(#CDMenuPuppetsOff)
  178.   sendAllSprites(#layoutPuppetsOff)
  179.   deselect menuController
  180.   --  pass
  181. end
  182.  
  183. on oldMouseUp me
  184.   global Fqtvr
  185.   
  186.   --back to QTVR button
  187.   puppetSprite 22, false
  188.   
  189.   resetInfo
  190.   if Fqtvr = "" then
  191.     set Fqtvr="no"  
  192.     sound playfile 1,"instr4"
  193.   end if
  194.   go to "Pexterior"
  195. end
  196.